﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;

/* Generated  */
namespace EDMXParserV1
{
        [Serializable]
    public class ComplexTypeMapping
    {
        public ComplexTypeMapping()
        {
            ScalarProperties = new List<ScalarProperty>();
        }
        public List<ScalarProperty> ScalarProperties { get; set; }

        public String TypeName { get; set; }

        public static ComplexTypeMapping New(System.Xml.XmlNode Node)
        {
            ComplexTypeMapping ComplexTypeMapping = new ComplexTypeMapping();

            foreach (XmlAttribute Attribute in Node.Attributes)
            {
                switch (Attribute.Name)
                {
                    case "TypeName":
                        ComplexTypeMapping.TypeName = Attribute.Value;
                        break;
                    default:
                        Globals.AttributeSwitchCoder(Attribute);
                        break;
                }

            }

            foreach (XmlNode ChildNode in Node.ChildNodes)
            {
                switch (ChildNode.Name)
                {
                    case "ScalarProperty":
                        ScalarProperty ScalarProperty = ScalarProperty.New(ChildNode);
                        ComplexTypeMapping.ScalarProperties.Add(ScalarProperty);
                        break;
                    default:
                        Globals.NodeSwitchCoder(ChildNode);
                        break;
                }
            }
            return ComplexTypeMapping;

        }
    }
}
